1. Field of the Invention
The present invention relates to managing locks to assets in distributed data storage systems such as file systems and databases.
2. Description of the Related Art
Distributed file systems are used to provide data sharing in distributed computer systems. Such systems centralize data storage, which improves the scalability and manageability of data access control. Moreover, centralized data storage also facilitates, among other things, easier storage device replacement and data backups, as compared to systems in which data storage is fragmented among local storage devices of many computers. It is to be understood that while, for disclosure purposes, the present discussion focuses on file systems, the principles set forth herein apply equally to other distributed data storage systems, such as distributed database systems.
To synchronize data access such that users share consistent views of shared data, requests from users to read and write data typically are sent to a central file server. The file server then manages access to the data using “locks” to ensure, e.g., that one user is not updating shared data by writing to it while another user might read an out-of-date version of the same data. Thus, users use locks to synchronize access to a distributed resource, and a lock comes with a guarantee as the actions the user can take under that lock and the actions that the lock prohibits other users from performing.
Two main components of locking schemes exist, namely, the locking mode (defining what actions that a lock permits and prevents) and locking protocol (defining who holds a lock, how it is granted, and how it is ceded back). The present invention is directed to methods for dynamically determining lock compatibility in systems using preemptible lock protocols, non-preemptible lock protocols, and most preferably the semi-preemptible lock protocol disclosed in related IBM case no. AM9-99-0079.
Heretofore, to determine whether a requested lock is compatible with outstanding locks, lock compatibility tables have been used. Essentially, a lock compatibility table is a matrix which can be accessed which indicates, for each type of lock, what other locks are compatible with it. As recognized by the present invention, when many combinations of locks are possible the compatibility tables can become excessively large because the size of the table grows with the square of the number of locks. The present invention has recognized the inherent scalability problem of compatibility tables and has provided the solutions noted below.